import request from '../../http/index';

// 考试频度下拉框列表
export function getFrequencyCombobox() {
	return request({
		url: '/dev/knowledgepoints/getFrequencyCombobox',
		method: 'get'
	})
}

// 查询知识点列表信息
export function searchKnowledgePoints(data) {
	return request({
		url: '/dev/knowledgepoints/searchKnowledgePoints',
		method: 'post',
		data
	})
}

export function addKnowledgePoints(data) {
	return request({
		url: '/dev/knowledgepoints/addKnowledgePoints',
		method: 'post',
		data
	})
}
// 更新知识点
export function modifyKnowledgePoints(data) {
	return request({
		url: '/dev/knowledgepoints/modifyKnowledgePoints',
		method: 'post',
		data
	})
}
// 根据知识点id删除知识点
export function delKnowledgePointsById(id) {
	return request({
		url: '/dev/knowledgepoints/delKnowledgePointsById?id='+id,
		method: 'post'
	})
}
// 查询关联直接前序知识点列表信息
export function selectKnowledgePoints(data) {
	return request({
		url: '/dev/knowledgepoints/selectKnowledgePoints',
		method: 'post',
		data
	})
}

// 新增直接前序知识点图谱关系
export function addOrDeleteRelationship(from,to) {
	return request({
		url: '/dev/knowledgepoints/addOrDeleteRelationship?from='+from+'&to='+to,
		method: 'post'
	})
}

// 根据知识点编号获取所有直接前序知识点集合
export function getDirectKnowledgePoints(pointsNO) {
	return request({
		url: '/dev/knowledgepoints/getDirectKnowledgePoints?pointsNO='+pointsNO,
		method: 'get'
	})
}


// 根据知识点编号获取知识点关系图谱
export function getKnowledgePointsChart(pointsNO) {
	return request({
		url: '/dev/knowledgepoints/getKnowledgePointsChart?pointsNO='+pointsNO,
		method: 'get'
	})
}



// 根据id获取知识点信息
export function getKnowledgePointsById(id) {
	return request({
		url: '/dev/knowledgepoints/getKnowledgePointsById?id='+id,
		method: 'get'
	})
}


// 知识点图谱命名
export function namePointsChart(chartName,pointsNO) {
	return request({
		url: '/dev/knowledgepoints/namePointsChart?chartName='+chartName+'&pointsNO='+pointsNO,
		method: 'post'
	})
}

// 知识点图谱上下架
export function upAndDownPointsChart(pointsNO) {
	return request({
		url: '/dev/knowledgepoints/upAndDownPointsChart?pointsNO='+pointsNO,
		method: 'post'
	})
}

// 查询知识点关联图谱集合信息
export function searchKnowledgePointsChart(data) {
	return request({
		url: '/dev/knowledgepoints/searchKnowledgePointsChart',
		method: 'post',
		data
	})
}

